package com.gomyb.storage;

import com.gomyb.storage.model.CloudStorageAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * @author <a href="mailto:hellohesir@gmail.com">Mr_He</a>
 * 2019/3/6 20:06
 */
@Configuration
public class StorageConfig extends AbstractCloudServiceHandler {

    @Autowired(required = false)
    private CloudStorageAuth cloudStorageAuth;

    @Override
    public CloudStorageAuth init() {
        if (null != cloudStorageAuth) {
            return cloudStorageAuth;
        }
        throw new RuntimeException("cloudStorageAuth bean is not exits");
    }
}
